﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ComputerGraphics.Geometry
{
    public class Intersection
    {
        private Shape shape;
        private Ray ray;
        private double dist;
        private Point3D position;
        private Point3D normal;

        public Intersection(Ray ray, Shape shape, double dist, Point3D position, Point3D normal)
        {
            this.ray = ray;
            this.shape = shape;
            this.dist = dist;
            this.position = position;
            this.normal = normal;
        }

        public Shape Shape
        {
            get { return shape; }
        }

        public Ray Ray
        {
            get { return ray; }
        }

        public double Distance
        {
            get { return dist; }
        }

        public Point3D Position
        {
            get { return position; }
        }

        public Point3D Normal
        {
            get { return this.normal; }
            set { this.normal = -value; }
        }
    }
}
